#include "tree.h"

NODE::NODE(elemtype c)
{
    e = c;
    left = nullptr;
    right = nullptr;
}
void NODE::showMid()
{
    if (left != nullptr)
        left->showMid();
    putchar(e);
    if (right != nullptr)
        right->showMid();
}
void NODE::showRear()
{
    if (left)
        left->showRear();
    if (right)
        right->showRear();
    putchar(e);
}